home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Sample Controls / Label / CLabelError.cp < prev    next >
Encoding:
Text File  |  1996-12-20  |  1.1 KB  |  60 lines  |  [TEXT/CWIE]

  1. #include "ocheaders.h"
  2. #include "CBaseControl.h"
  3. #include "CErrorControl.h"
  4. #include "CLabelControl.h"
  5. #include "CError.h"
  6. #include "CLabelError.h"
  7. #include "FnAssert.h"
  8.  
  9. #define MControl ((CLabelControl *)mControl)
  10.  
  11. ///////////////////////////////////////////////////////////////////////////////
  12. //
  13. // CLabelError::CLabelError
  14. //
  15.  
  16. CLabelError::CLabelError(ErrorCode error) : CError(error)
  17. {
  18. }
  19.  
  20. CLabelError::CLabelError(ErrorCode error, CErrorControl * control)
  21.     : CError(error, control)
  22. {
  23. }
  24.  
  25. ///////////////////////////////////////////////////////////////////////////////
  26. //
  27. // CLabelError::HandleError
  28. //
  29.  
  30. void CLabelError::HandleError(void)
  31. {
  32.     switch ( mErrorCode )
  33.     {
  34.         case CONTROL_GWORLD_ALLOCATION_ERROR:
  35.         {
  36.             ASSERT(0, "A GWorld could not be allocated!");            
  37.             break;
  38.         }
  39.         case GWORLD_ALLOCATION_ERROR:
  40.         {
  41.             ASSERT(0, "A GWorld could not be allocated!");
  42.             break;
  43.         }
  44.         
  45.         case ROTATION_FAILED_ERROR:
  46.         {
  47.             ASSERT(0, "Unable to perform rotation!");
  48.             break;
  49.         }
  50.         
  51.         case CONTROL_BAD_ALIGNMENT_PARAM_ERROR:
  52.         {
  53.             ASSERT(0, "Bogus parameter passed in");
  54.             break;
  55.         }
  56.         default:
  57.             break;
  58.     }
  59. }
  60.